* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* 上传区域 */
.upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: #f8f9ff;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #764ba2;
    background: #f0f2ff;
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #4CAF50;
    background: #f0fff0;
    transform: scale(1.02);
}

.upload-content i {
    font-size: 4rem;
    color: #667eea;
    margin-bottom: 20px;
}

.upload-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
}

.upload-content p {
    color: #666;
    margin-bottom: 8px;
}

.select-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.select-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* 设置区域 */
.settings-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.settings-section h3 {
    margin-bottom: 20px;
    color: #333;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.setting-item label {
    font-weight: 600;
    min-width: 100px;
}

.setting-item input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.setting-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

#qualityValue {
    font-weight: bold;
    color: #667eea;
    min-width: 50px;
}

.quality-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #666;
}

.quality-info .low { color: #ff6b6b; }
.quality-info .medium { color: #feca57; }
.quality-info .high { color: #48dbfb; }

/* 文件列表 */
.file-list-section {
    margin-bottom: 30px;
}

.file-list-section h3 {
    margin-bottom: 20px;
    color: #333;
}

.file-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
    transition: background 0.3s ease;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item:hover {
    background: #f8f9fa;
}

.file-item i {
    color: #667eea;
    margin-right: 10px;
    font-size: 1.2rem;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.file-size {
    font-size: 0.9rem;
    color: #666;
}

.remove-file {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.convert-btn, .clear-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.convert-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    flex: 2;
}

.convert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(76, 175, 80, 0.3);
}

.clear-btn {
    background: #ff6b6b;
    color: white;
    flex: 1;
}

.clear-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
}

/* 结果区域 */
.results-section {
    background: #f0fff0;
    padding: 25px;
    border-radius: 15px;
    border-left: 5px solid #4CAF50;
}

.results-section h3 {
    margin-bottom: 20px;
    color: #333;
}

.result-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.result-item.success {
    border-left: 4px solid #4CAF50;
}

.result-item.error {
    border-left: 4px solid #ff6b6b;
}

.result-info {
    flex: 1;
}

.result-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.result-details {
    font-size: 0.9rem;
    color: #666;
}

.compression-ratio {
    color: #4CAF50;
    font-weight: bold;
}

.download-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.download-all-btn, .clean-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.download-all-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex: 2;
}

.download-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.clean-btn {
    background: #ff9800;
    color: white;
    flex: 1;
}

.clean-btn:hover {
    background: #f57c00;
    transform: translateY(-2px);
}

/* 进度条 */
.progress-section {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 15px;
}

.progress-section h3 {
    margin-bottom: 20px;
    color: #333;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #ddd;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    width: 0%;
    transition: width 0.3s ease;
}

#progressText {
    color: #666;
    font-size: 1.1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 8px;
    }
    main {
        padding: 16px 4px;
        border-radius: 10px;
    }
    header h1 {
        font-size: 1.5rem;
    }
    header p {
        font-size: 0.95rem;
    }
    .upload-area {
        padding: 30px 6px;
    }
    .upload-content i {
        font-size: 2.2rem;
    }
    .upload-content h3 {
        font-size: 1.1rem;
    }
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .action-buttons, .download-actions {
        flex-direction: column;
        gap: 8px;
    }
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .file-list {
        max-height: 180px;
        padding: 4px;
    }
    .file-item {
        padding: 6px 2px;
        font-size: 0.95rem;
    }
    .select-btn, .convert-btn, .clear-btn, .download-all-btn, .clean-btn {
        padding: 8px 16px;
        font-size: 0.95rem;
        border-radius: 18px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 2px;
    }
    main {
        padding: 6px 0;
        border-radius: 6px;
    }
    header h1 {
        font-size: 1.1rem;
    }
    header p {
        font-size: 0.8rem;
    }
    .upload-area {
        padding: 12px 2px;
    }
    .upload-content i {
        font-size: 1.3rem;
    }
    .upload-content h3 {
        font-size: 0.95rem;
    }
    .setting-item label {
        min-width: 70px;
        font-size: 0.95rem;
    }
    .file-item {
        font-size: 0.85rem;
    }
    .select-btn, .convert-btn, .clear-btn, .download-all-btn, .clean-btn {
        padding: 6px 8px;
        font-size: 0.85rem;
        border-radius: 12px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.file-list-section, .results-section, .progress-section {
    animation: fadeIn 0.5s ease;
}

/* 滚动条样式 */
.file-list::-webkit-scrollbar {
    width: 8px;
}

.file-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.file-list::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.file-list::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

.download-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.download-btn:hover {
    background: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(102, 126, 234, 0.3);
} 